package org.rednebula.framework.core.service;

import java.util.List;
import java.util.Map;

import org.rednebula.framework.core.model.PropertyFilter;



public interface IDbService {
	void save(final Object entity);

	void update(final Object entity);

	Object get(final Object id, Class<?> entityClass);
	
	 <X> List<X> find(final String hql, final Object... values);
	 
	 <X> X findUnique(final String hql, final Object... values);
	 
	<X> List<X> find(Class<?> entityClass,List<PropertyFilter> filters) ;
	

	void delete(final Object entity);

	void delete(final Object id, Class<?> entityClass);

	int batchExecute(final String hql, final Object... values);

	int batchExecute(final String hql, final Map<String, Object> values);
}
